/** 仓库管理路由 */
import Layout from '@/layout'

export default {
  path: '/storehouse',
  component: Layout,
  redirect: '/storehouse/requisitioning/warehouseAllocation',
  name: 'Storehouse',
  meta: {
    title: '仓库管理',
    icon: 'warehouse'
  },
  children: [
    {
      path: 'requisitioning',
      name: 'Requisitioning',
      component: { render: (e) => e("router-view") },
      meta: { title: '调拨管理' },
      children: [
        {
          path: 'warehouseAllocation',
          component: () => import('@/views/storehouse/requisitioning/warehouseAllocation/index'),
          name: 'WarehouseAllocation',
          meta: { title: '仓库调拨' }
        },
        {
          path: 'storeAllocation',
          component: () => import('@/views/storehouse/requisitioning/storeAllocation/index'),
          name: 'StoreAllocation',
          meta: { title: '门店调拨' }
        },
        {
          path: 'locationAllocation',
          component: () => import('@/views/storehouse/requisitioning/locationAllocation/index'),
          name: 'LocationAllocation',
          meta: { title: '货位调拨' }
        }
      ]
    },
    {
      path: 'outManagement',
      name: 'OutManagement',
      component: { render: (e) => e("router-view") },
      meta: { title: '出库管理' },
      children: [
        {
          path: 'transferIssue',
          component: () => import('@/views/storehouse/outManagement/transferIssue/index'),
          name: 'TransferIssue',
          meta: { title: '调拨出库' }
        },
        {
          path: 'distributeIssue',
          component: () => import('@/views/storehouse/outManagement/distributeIssue/index'),
          name: 'DistributeIssue',
          meta: { title: '铺货出库' }
        },
        {
          path: 'returnIssue',
          component: () => import('@/views/storehouse/outManagement/returnIssue/index'),
          name: 'ReturnIssue',
          meta: { title: '退货出库' }
        },
        {
          path: 'salesIssue',
          component: () => import('@/views/storehouse/outManagement/salesIssue/index'),
          name: 'SalesIssue',
          meta: { title: '销售出库' }
        }
      ]
    },
    {
      path: 'inManagement',
      name: 'InManagement',
      component: { render: (e) => e("router-view") },
      meta: { title: '入库管理' },
      children: [
        {
          path: 'purchaseReceipt',
          component: () => import('@/views/storehouse/inManagement/purchaseReceipt/index'),
          name: 'PurchaseReceipt',
          meta: { title: '采购入库' }
        },
        {
          path: 'transferReceipt',
          component: () => import('@/views/storehouse/inManagement/transferReceipt/index'),
          name: 'TransferReceipt',
          meta: { title: '调拨入库' }
        },
        {
          path: 'storeReturnsIn',
          component: () => import('@/views/storehouse/inManagement/storeReturnsIn/index'),
          name: 'StoreReturnsIn',
          meta: { title: '门店退货入库' }
        },
        {
          path: 'salesReturnsIn',
          component: () => import('@/views/storehouse/inManagement/salesReturnsIn/index'),
          name: 'SalesReturnsIn',
          meta: { title: '销售退货入库' }
        }
      ]
    },
    {
      path: 'storeFile',
      name: 'StoreFile',
      component: { render: (e) => e("router-view") },
      meta: { title: '库位管理' },
      children: [
        {
          path: 'locationManagement',
          component: () => import('@/views/storehouse/storeFile/locationManagement'),
          name: 'LocationManagement',
          meta: { title: '库位管理' }
        }
      ]
    },
    {
      path: 'inventory',
      name: 'Inventory',
      component: { render: (e) => e("router-view") },
      meta: { title: '库存管理' },
      children: [
        {
          path: 'timeStock',
          component: () => import('@/views/storehouse/inventory/timeStock'),
          name: 'TimeStock',
          meta: { title: '即时库存' }
        },
        {
          path: 'account',
          component: () => import('@/views/storehouse/inventory/account'),
          name: 'Account',
          meta: { title: '库存台账' }
        }
      ]
    },
    {
      path: 'opration',
      name: 'Opration',
      component: { render: (e) => e("router-view") },
      meta: { title: '盘点管理' },
      children: [
        {
          path: 'task',
          component: () => import('@/views/storehouse/opration/task'),
          name: 'Task',
          meta: { title: '盘点任务' }
        },
        {
          path: 'result',
          component: () => import('@/views/storehouse/opration/result'),
          name: 'Result',
          meta: { title: '盘点解结果' }
        },
        {
          path: 'create',
          component: () => import('@/views/storehouse/opration/create'),
          name: 'oprationCreate',
          meta: { title: '新增盘点' }
        }
      ]
    } 
  ]
} 